fix(release): replace secrets-in-if with env-bridge guard step#276
Merged
fix(release): replace secrets-in-if with env-bridge guard step#276
Conversation
\`if: \${{ secrets.CI_APP_ID != '' }}\` is invalid in a reusable
(workflow_call) workflow — GHA rejects with "Unrecognized named-value:
'secrets'" at workflow load time, and every caller fails to validate
with a 0-second runtime and the path-as-name fallback.
Materialize the secret through env in a guard step, then gate the
Mint step on that step's output. Same observable behavior as before
(skip mint when CI_APP_ID empty), but the if-expression now uses
steps.check-app.outputs.* which is allowed in callable workflows.
Caught when wiring up overnight-burndown's prerelease workflow.
Until this lands, every caller of reusable-release.yml fails to
validate.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
if: ${{ secrets.CI_APP_ID != '' }}is invalid in a reusable (workflow_call) workflow — GitHub Actions rejects with:Every caller fails to validate (0-second runtime, name shows as the file path instead of
name:).Materialize the secret through
envin a guard step, then gate the Mint step on that step's output. Same observable behavior — skip mint whenCI_APP_IDis empty — but the if-expression usessteps.check-app.outputs.*which IS allowed in callable workflows.How this snuck in
Original commit
c46f978("skip app-token mint when CI_APP_ID is unset") swappedcontinue-on-error: trueforif: ${{ secrets.CI_APP_ID != '' }}.continue-on-errorworked in a reusable; the if expression doesn't.Test plan
🤖 Generated with Claude Code